package com.wkl.controller;

import com.wkl.config.aspects.demo01.AopConfig;
import com.wkl.service.UserService;
import com.wkl.service.impl.UserServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = AopConfig.class)
public class TestClass {

    @Autowired
    private UserService userService;

    @Test
    public void test() {
        userService.getUser();
    }

    @Test
    public void addUser() {
        userService.addUser();
    }

    @Test
    public void testEx() {
        throw new RuntimeException();
    }

}

